package com.example.hemin.fnb.ui.adapter;

import android.support.annotation.Nullable;
import android.view.View;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.example.hemin.fnb.R;
import com.example.hemin.fnb.ui.bean.ShopMessageBean;

import java.util.List;

public class ShopAddressMessageAdapter extends BaseQuickAdapter<ShopMessageBean, BaseViewHolder> {
    public ShopAddressMessageAdapter(int layoutResId, @Nullable List<ShopMessageBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, ShopMessageBean item) {
                    helper.setText(R.id.text,item.getName()).setText(R.id.text2,item.getPhone()).setText(R.id.text4,item.getAddress());
                    if(item.getStatus() == 1){
                        helper.getView(R.id.text3).setVisibility(View.VISIBLE);
                    }else {
                        helper.getView(R.id.text3).setVisibility(View.GONE);
                    }
    }
}
